#ifndef __win32WindowImpl__h__included__
#define __win32WindowImpl__h__included__

#include "neiderra/core/Core.h"
#include "win32WndClass.h"
#include "neiderra/gui/WindowImpl.h"
#include "neiderra/gui/Window.h"
#include "neiderra/render/iRenderer.h"

using neiderra::core::Core;
using neiderra::rendering::iRenderer;
using neiderra::gui::win32WndClass;

namespace neiderra { 
		namespace gui {

			class win32WindowImpl: public GUIWindowImpl {
			public:
				win32WindowImpl(Core* core,	GUIWindow* container,	const std::string& title, win32WndClass* wndClass );
				win32WindowImpl(Core* core,	GUIWindow* container,	const std::string& title, win32WndClass* wndClass, int x, int y, int width, int height,	GUIWindow* parent );
				static LRESULT CALLBACK MsgRouter(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
				virtual bool isAlive();
				virtual void swapBuffers();
				virtual void setRenderer(iRenderer*);
				LRESULT WndProc(UINT message, WPARAM wparam, LPARAM lparam);
				HWND getHWND();
				unsigned getWidth();
				unsigned getHeight();
				void setHWND(HWND hWnd);
				long getID();
				void show();
				void update();
				virtual ~win32WindowImpl();
			protected:
				HWND hWnd_;
				HDC hDC_;
				win32WndClass* wndClass_;

			};
		}
}

#endif
